import request from '@/utils/request'

// 列表
export const flashSessionList = (params) => {
    return request({
        url: '/flashSession/list',
        method: 'get',
        params
    })
}

// 选择列表详情
export const fetchSelectList = (params) => {
    return request({
        url: '/flashSession/selectList',
        method: 'get',
        params: params
    })
}

// 更新状态
export const updateSessionStatus = (id, params) => {
    return request({
        url: '/flashSession/update/status/' + id,
        method: 'post',
        params: params
    })
}

// 删除
export const deleteSession = (id) => {
    return request({
        url: '/flashSession/delete/' + id,
        method: 'post'
    })
}

// 创建
export const createSession = (data) => {
    return request({
        url: '/flashSession/create',
        method: 'post',
        data: data
    })
}

// 更新数据
export const updateSession = (id, data) => {
    return request({
        url: '/flashSession/update/' + id,
        method: 'post',
        data: data
    })
}